package com.cloudfun.campusshare.controller;

import com.cloudfun.campusshare.common.model.vo.BackCardBindVO;
import com.cloudfun.campusshare.common.response.BaseResult;
import com.cloudfun.campusshare.common.response.BaseResultFactory;
import com.cloudfun.campusshare.common.security.AuthRequired;
import com.cloudfun.campusshare.service.MerchantRegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.Builder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2021/3/25 20:00
 * @description :
 */

@Slf4j
@RestController
@RequestMapping("/v1/merchantRegister")
@Api(value = "商户进件模块")
@AuthRequired
public class MerchantRegisterController {
    @Autowired
    private MerchantRegisterService merchantRegisterService;

    @PostMapping("/submit")
    @ApiOperation(value = "提交进件信息")
    public BaseResult bindInfo(@ApiParam(value = "进件信息") @RequestBody BackCardBindVO backCardBindVO){
        merchantRegisterService.submitRegisterRequest(backCardBindVO);
        return BaseResultFactory.produceSuccess();
    }
}
